/**
 * 大剂量早餐预设数据
 */
import util from '@/lib/util'
const KEY_THREE_MEALS_PRESET = "KEY_THREE_MEALS_PRESET";

export default class ThreeMealsPreset {

    /**早餐预设 */
    presetBreakfast = 4.9

    /**午餐预设 */
    presetLunch = 4.9

    /**晚餐预设 */
    presetDinner = 4.9

    getPresets() {
        const records = util.cookies.get(KEY_THREE_MEALS_PRESET);
        if (!records) return this;// 返回默认的数据

        return JSON.parse(records);
    }

    updatePresets(model) {
        util.cookies.set(KEY_THREE_MEALS_PRESET, model);
    }
}